-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show board name in browser title #3499
Conversation
src/components/Controls.vue
Outdated
@@ -271,6 +271,8 @@ export default { | |||
if (current?.id !== previous?.id) { | |||
this.clearFilter() | |||
} | |||
|
|||
document.title = this.board.title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure to store the default page title like "Deck - Nextcloud" that is set and then only add the board title in front. You can find some inspiration on that in the Talk app: https://github.com/nextcloud/spreed/blob/master/src/App.vue#L418-L441
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also if no board is set, it should then fall back tio the default one ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check again. All fixed.
90448a6
to
fbf878f
Compare
fbf878f
to
c254a0e
Compare
src/components/Controls.vue
Outdated
setPageTitle(title) { | ||
if (this.defaultPageTitle === false) { | ||
this.defaultPageTitle = window.document.title | ||
if (this.defaultPageTitle.indexOf(' - ' + t('spreed', 'Deck') + ' - ') !== -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (this.defaultPageTitle.indexOf(' - ' + t('spreed', 'Deck') + ' - ') !== -1) { | |
if (this.defaultPageTitle.indexOf(' - Deck - ') !== -1) { |
The app name is currently not translated anywhere, so let's stick to that. Otherwise spreed would be the wrong app id here ;)
src/components/Controls.vue
Outdated
if (this.defaultPageTitle === false) { | ||
this.defaultPageTitle = window.document.title | ||
if (this.defaultPageTitle.indexOf(' - ' + t('spreed', 'Deck') + ' - ') !== -1) { | ||
this.defaultPageTitle = this.defaultPageTitle.substring(this.defaultPageTitle.indexOf(' - ' + t('spreed', 'Deck') + ' - ') + 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.defaultPageTitle = this.defaultPageTitle.substring(this.defaultPageTitle.indexOf(' - ' + t('spreed', 'Deck') + ' - ') + 3) | |
this.defaultPageTitle = this.defaultPageTitle.substring(this.defaultPageTitle.indexOf(' - Deck - ') + 3) |
src/components/Controls.vue
Outdated
if (this.defaultPageTitle.indexOf(t('spreed', 'Deck') + ' - ') !== 0) { | ||
this.defaultPageTitle = t('spreed', 'Deck') + ' - ' + this.defaultPageTitle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (this.defaultPageTitle.indexOf(t('spreed', 'Deck') + ' - ') !== 0) { | |
this.defaultPageTitle = t('spreed', 'Deck') + ' - ' + this.defaultPageTitle | |
if (this.defaultPageTitle.indexOf('Deck - ') !== 0) { | |
this.defaultPageTitle = 'Deck - ' + this.defaultPageTitle |
Signed-off-by: Luka Trovic <luka@nextcloud.com>
c254a0e
to
b26f61b
Compare
Signed-off-by: Luka Trovic luka@nextcloud.com
Summary
Now it shows the current board name in the browser title.
TODO
Checklist